@for $row from 0 through 3 {
    @for $column from 0 through 3 {
      .position_#{$row}_#{$column}:not(.isMoving) {
        top: 110px * $row + 5px;
        left: 110px * $column + 5px;
      }
    }
  }
  
  @for $fromRow from 0 through 3 {
    @for $toRow from 0 through 3 {
      $name: row_from_#{$fromRow}_to_#{$toRow};
  
      @if $fromRow == $toRow {
        .#{$name} {
          top: 110px * $toRow + 5px;
        }
      } @else {
        .#{$name} {
          animation-duration: 0.20s;
          animation-name: $name;
          animation-fill-mode: forwards;
        }
  
        @keyframes #{$name} {
          from {
            top: 110px * $fromRow + 5px;
          }
          to {
            top: 110px * $toRow + 5px;
          }
        }
      }
    }
  }
  
  @for $fromColumn from 0 through 3 {
    @for $toColumn from 0 through 3 {
      $name: column_from_#{$fromColumn}_to_#{$toColumn};
  
      @if $fromColumn == $toColumn {
        .#{$name} {
          left: 110px * $toColumn + 5px;
        }
      } @else {
        .#{$name} {
          animation-duration: 0.20s;
          animation-name: $name;
          animation-fill-mode: forwards;
        }
  
        @keyframes #{$name} {
          from {
            left: 110px * $fromColumn + 5px;
          }
          to {
            left: 110px * $toColumn + 5px;
          }
        }
      }
    }
  }
  